import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import './assets/common/base.css'
import './assets/fonticon/iconfont.css'
import axios from 'axios'
import TreeTable from 'vue-table-with-tree-grid'
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import Echarts from 'echarts'

Vue.use(VueQuillEditor)
Vue.use(Echarts)
axios.defaults.baseURL = "http://127.0.0.1:8888/api/private/v1/"
// 添加请求拦截器
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // 必须return config
  return config;
})
Vue.prototype.$axios = axios
Vue.component('tree-table', TreeTable)
// 或
// Vue.component(TreeTable.name,TreeTable)
// 配置基准路径
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
